package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CollectionToAnArray {
	public static void main(String[] argv) {
		ArrayList<String> al = new ArrayList<String>();
		al.add("cat");
		al.add("dog");
		al.add("rat");

		System.out.println("ArrayList:" + al);
		String[] s2 = al.toArray(new String[0]);
		System.out.println("s2:" + Arrays.toString(s2));
	}
}
